<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="selenium.base" href="" />
<title>Test_POR_10_002_DeleteCurrentPortalByLegalUser</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">Test_POR_10_002_DeleteCurrentPortalByLegalUser</td></tr>
</thead><tbody>
<tr>
	<td>open</td>
	<td>/portal/public/classic/</td>
	<td></td>
</tr>
<tr>
	<td>echo</td>
	<td>--Create new portal with valid value--</td>
	<td></td>
</tr>
<tr>
	<td>windowMaximize</td>
	<td></td>
	<td></td>
</tr>
<tr>
	<td>click</td>
	<td>link=Sign in</td>
	<td></td>
</tr>
<tr>
	<td>waitForElementPresent</td>
	<td>username</td>
	<td></td>
</tr>
<tr>
	<td>type</td>
	<td>username</td>
	<td>root</td>
</tr>
<tr>
	<td>type</td>
	<td>password</td>
	<td>gtn</td>
</tr>
<tr>
	<td>clickAndWait</td>
	<td>//div[@id='UIPortalLoginFormAction']//a</td>
	<td></td>
</tr>
<tr>
	<td>echo</td>
	<td>--Go to Site--</td>
	<td></td>
</tr>
<tr>
	<td>waitForElementPresent</td>
	<td>link=Site</td>
	<td></td>
</tr>
<tr>
	<td>clickAndWait</td>
	<td>link=Site</td>
	<td></td>
</tr>
<tr>
	<td>echo</td>
	<td>--Create new portal --</td>
	<td></td>
</tr>
<tr>
	<td>waitForElementPresent</td>
	<td>link=Add New Portal</td>
	<td></td>
</tr>
<tr>
	<td>click</td>
	<td>link=Add New Portal</td>
	<td></td>
</tr>
<tr>
	<td>echo</td>
	<td>--Choose Portal Setting--</td>
	<td></td>
</tr>
<tr>
	<td>waitForElementPresent</td>
	<td>//div[@id='UISiteManagement']//div[@class='UIAction']//div[@class='ActionButton BlueButton']</td>
	<td></td>
</tr>
<tr>
	<td>click</td>
	<td>//div[@id='UISiteManagement']//div[@class='UIAction']//div[@class='ActionButton BlueButton']</td>
	<td></td>
</tr>
<tr>
	<td>waitForElementPresent</td>
	<td>name</td>
	<td></td>
</tr>
<tr>
	<td>type</td>
	<td>name</td>
	<td>Test_POR_10_002</td>
</tr>
<tr>
	<td>select</td>
	<td>locale</td>
	<td>label=English</td>
</tr>
<tr>
	<td>select</td>
	<td>skin</td>
	<td>label=Default</td>
</tr>
<tr>
	<td>echo</td>
	<td>--Choose Properties--</td>
	<td></td>
</tr>
<tr>
	<td>waitForElementPresent</td>
	<td>//div[@id='UIMaskWorkspace']//div[@class='TabsContainer']/div[2]//div[@class='MiddleTab']</td>
	<td></td>
</tr>
<tr>
	<td>clickAt</td>
	<td>//div[@id='UIMaskWorkspace']//div[@class='TabsContainer']/div[2]//div[@class='MiddleTab']</td>
	<td></td>
</tr>
<tr>
	<td>select</td>
	<td>sessionAlive</td>
	<td>label=On Demand</td>
</tr>
<tr>
	<td>echo</td>
	<td>--Select Permission Setting--</td>
	<td></td>
</tr>
<tr>
	<td>waitForElementPresent</td>
	<td>//div[@id='UIMaskWorkspace']//div[@class='TabsContainer']/div[3]//div[@class='MiddleTab']</td>
	<td></td>
</tr>
<tr>
	<td>click</td>
	<td>//div[@id='UIMaskWorkspace']//div[@class='TabsContainer']/div[3]//div[@class='MiddleTab']</td>
	<td></td>
</tr>
<tr>
	<td>echo</td>
	<td>--Access Permission Setting</td>
	<td></td>
</tr>
<!--=============-->
<tr>
	<td>waitForElementPresent</td>
	<td>link=Add Permission</td>
	<td></td>
</tr>
<tr>
	<td>click</td>
	<td>link=Add Permission</td>
	<td></td>
</tr>
<tr>
	<td>waitForElementPresent</td>
	<td>//div[@onclick=&quot;javascript:eXo.webui.UIForm.submitEvent('UIPortalForm','ChangeNode','&amp;subComponentId=TreeListPermissionSelector&amp;objectId=/platform')&quot;]</td>
	<td></td>
</tr>
<tr>
	<td>click</td>
	<td>//div[@onclick=&quot;javascript:eXo.webui.UIForm.submitEvent('UIPortalForm','ChangeNode','&amp;subComponentId=TreeListPermissionSelector&amp;objectId=/platform')&quot;]</td>
	<td></td>
</tr>
<tr>
	<td>waitForElementPresent</td>
	<td>//a[contains(text(),'Administrators')]</td>
	<td></td>
</tr>
<tr>
	<td>click</td>
	<td>//a[contains(text(),'Administrators')]</td>
	<td></td>
</tr>
<tr>
	<td>waitForElementPresent</td>
	<td>//a[contains(text(),'*')]</td>
	<td></td>
</tr>
<tr>
	<td>click</td>
	<td>//a[contains(text(),'*')]</td>
	<td></td>
</tr>
<!--------------------------->
<tr>
	<td>echo</td>
	<td>--Edit Permission Setting--</td>
	<td></td>
</tr>
<tr>
	<td>waitForElementPresent</td>
	<td>link=Edit Permission Setting</td>
	<td></td>
</tr>
<tr>
	<td>click</td>
	<td>link=Edit Permission Setting</td>
	<td></td>
</tr>
<tr>
	<td>waitForElementPresent</td>
	<td>link=Select Permission</td>
	<td></td>
</tr>
<tr>
	<td>click</td>
	<td>link=Select Permission</td>
	<td></td>
</tr>
<tr>
	<td>waitForElementPresent</td>
	<td>link=Platform</td>
	<td></td>
</tr>
<tr>
	<td>click</td>
	<td>link=Platform</td>
	<td></td>
</tr>
<tr>
	<td>waitForElementPresent</td>
	<td>//div[@id='PermissionSelector']/div/div[3]/div/div[2]/div[4]/a</td>
	<td></td>
</tr>
<tr>
	<td>click</td>
	<td>//div[@id='PermissionSelector']/div/div[3]/div/div[2]/div[4]/a</td>
	<td></td>
</tr>
<tr>
	<td>waitForElementPresent</td>
	<td>link=Save</td>
	<td></td>
</tr>
<tr>
	<td>click</td>
	<td>link=Save</td>
	<td></td>
</tr>
<tr>
	<td>waitForElementPresent</td>
	<td>xpath=//div[@id='UISiteManagement']/table[2]/tbody/tr/td[3]/a[4]</td>
	<td></td>
</tr>
<tr>
	<td>echo</td>
	<td>--Go to Site to check existing portal list to use--</td>
	<td></td>
</tr>
<tr>
	<td>waitForElementPresent</td>
	<td>link=Site</td>
	<td></td>
</tr>
<tr>
	<td>clickAndWait</td>
	<td>link=Site</td>
	<td></td>
</tr>
<tr>
	<td>echo</td>
	<td>--Delete portal --</td>
	<td></td>
</tr>
<tr>
	<td>waitForElementPresent</td>
	<td>//div[@id='UISiteManagement']/table[2]/tbody/tr/td[3]/a[4]</td>
	<td></td>
</tr>
<tr>
	<td>click</td>
	<td>//div[@id='UISiteManagement']/table[2]/tbody/tr/td[3]/a[4]</td>
	<td></td>
</tr>
<tr>
	<td>waitForConfirmation</td>
	<td>Are you sure you want to delete this portal?</td>
	<td></td>
</tr>
<tr>
	<td>waitForTextNotPresent</td>
	<td>Test_POR_10_002</td>
	<td></td>
</tr>
<tr>
	<td>verifyTextNotPresent</td>
	<td>Test_POR_10_002</td>
	<td></td>
</tr>
<tr>
	<td>echo</td>
	<td>--Return to Site to check existing portals list after deleted--</td>
	<td></td>
</tr>
<tr>
	<td>waitForElementPresent</td>
	<td>link=Site</td>
	<td></td>
</tr>
<tr>
	<td>clickAndWait</td>
	<td>link=Site</td>
	<td></td>
</tr>
<tr>
	<td>waitForElementPresent</td>
	<td>link=Sign out</td>
	<td></td>
</tr>
<tr>
	<td>clickAndWait</td>
	<td>link=Sign out</td>
	<td></td>
</tr>

</tbody></table>
</body>
</html>
